using System;
using System.Collections;
using System.Web;
using Sedna.Core.Controller.Common;

namespace Sedna.Core.Controller
{
	/// <summary>
	/// Summary description for NestedExceptionHandler.
	/// </summary>
	public abstract class NestedExceptionHandler: AbstractExceptionHandler
	{			
		protected Exception GetTargetException(Exception exception)
		{
			if (exception==null)
			{
				return null;
			}
			if (exception.GetType().Equals(ExceptionType))
			{
				return exception;
			}
			return GetTargetException(exception.InnerException);
		}

	}
}
